import { defineComponent as H, reactive as W, watch as z, toRefs as E } from "vue-demi";
import { openBlock as n, createElementBlock as s, Fragment as h, createCommentVNode as g, createElementVNode as e, toDisplayString as l, renderList as p, createTextVNode as f, pushScopeId as O, popScopeId as R } from "vue";
const F = /-(\w)/g;
function A(t) {
  return t.replace(F, (d, u) => u.toUpperCase());
}
const U = "frog";
function q(t) {
  return t = `${U}-${t}`, [t, A(`-${t}`)];
}
function G(t) {
  return t.install = (d) => {
    const u = t.name, [b, i] = q(u);
    d.component(b, t), d.component(i, t), d.component(u, t), d.component(A(`-${u}`), t);
  }, t;
}
const J = (t) => t != null && t.startsWith("http") || t != null && t.startsWith("data:image") ? t : t ? `data:image/png;base64,${t}` : "";
const K = (t, d) => {
  const u = t.__vccOpts || t;
  for (const [b, i] of d)
    u[b] = i;
  return u;
}, M = [
  { name: "\u7ECF\u8425\u6027\u9053\u8DEF\u65C5\u5BA2\u8FD0\u8F93\u9A7E\u9A76\u5458", label: "\u9053\u8DEF\u5BA2\u8D27\u8FD0\u8F93\u9A7E\u9A76\u5458" },
  { name: "\u9053\u8DEF\u8D27\u7269\u8FD0\u8F93\u9A7E\u9A76\u5458", label: "\u9053\u8DEF\u5BA2\u8D27\u8FD0\u8F93\u9A7E\u9A76\u5458" },
  { name: "\u9053\u8DEF\u5371\u9669\u8D27\u7269\u8FD0\u8F93\u9A7E\u9A76\u5458", label: "\u9053\u8DEF\u5371\u9669\u8D27\u7269\u8FD0\u8F93\u9A7E\u9A76\u5458" },
  { name: "\u9053\u8DEF\u5371\u9669\u8D27\u7269\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458", label: "\u9053\u8DEF\u5371\u9669\u8D27\u7269\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458" },
  { name: "\u9053\u8DEF\u5371\u9669\u8D27\u7269\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458", label: "\u9053\u8DEF\u5371\u9669\u8D27\u7269\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458" },
  { name: "\u653E\u5C04\u6027\u7269\u54C1\u9053\u8DEF\u8FD0\u8F93\u9A7E\u9A76\u5458", label: "\u653E\u5C04\u6027\u7269\u54C1\u9053\u8DEF\u8FD0\u8F93\u9A7E\u9A76\u5458" },
  { name: "\u653E\u5C04\u6027\u7269\u54C1\u9053\u8DEF\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458", label: "\u653E\u5C04\u6027\u7269\u54C1\u9053\u8DEF\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458" },
  { name: "\u653E\u5C04\u6027\u7269\u54C1\u9053\u8DEF\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458", label: "\u653E\u5C04\u6027\u7269\u54C1\u9053\u8DEF\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458" },
  { name: "\u5267\u6BD2\u5316\u5B66\u54C1\u9053\u8DEF\u8FD0\u8F93\u9A7E\u9A76\u5458", label: "\u5267\u6BD2\u5316\u5B66\u54C1\u9053\u8DEF\u8FD0\u8F93\u9A7E\u9A76\u5458" },
  { name: "\u5267\u6BD2\u5316\u5B66\u54C1\u9053\u8DEF\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458", label: "\u5267\u6BD2\u5316\u5B66\u54C1\u9053\u8DEF\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458" },
  { name: "\u5267\u6BD2\u5316\u5B66\u54C1\u9053\u8DEF\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458", label: "\u5267\u6BD2\u5316\u5B66\u54C1\u9053\u8DEF\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458" },
  { name: "\u7206\u70B8\u54C1\u9053\u8DEF\u8FD0\u8F93\u9A7E\u9A76\u5458", label: "\u7206\u70B8\u54C1\u9053\u8DEF\u8FD0\u8F93\u9A7E\u9A76\u5458" },
  { name: "\u7206\u70B8\u54C1\u9053\u8DEF\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458", label: "\u7206\u70B8\u54C1\u9053\u8DEF\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458" },
  { name: "\u7206\u70B8\u54C1\u9053\u8DEF\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458", label: "\u7206\u70B8\u54C1\u9053\u8DEF\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458" },
  { name: "\u5DE1\u6E38\u51FA\u79DF\u6C7D\u8F66\u9A7E\u9A76\u5458", label: "\u51FA\u79DF\u6C7D\u8F66\u9A7E\u9A76\u5458" },
  { name: "\u7F51\u7EDC\u9884\u7EA6\u51FA\u79DF\u6C7D\u8F66\u9A7E\u9A76\u5458", label: "\u51FA\u79DF\u6C7D\u8F66\u9A7E\u9A76\u5458" }
], Q = H({
  name: "teachLog",
  props: {
    childData: {
      type: Object,
      default: () => {
      }
    }
  },
  setup(t) {
    const d = W({
      studyList: [
        { label: "\u6B21\u6570/\u65E5\u671F", value: [], prop: "timeDate" },
        { label: "\u6559\u5B66\u9879\u76EE", value: [], prop: "trainSubject" },
        { label: "\u6240\u7528\u5B66\u65F6", value: [], prop: "trainHour" },
        { label: "\u5B66\u5458\u7B7E\u5B57", value: [], prop: "name" },
        { label: "\u6559\u7EC3\u5458\u8BC4\u4EF7\u53CA\u7B7E\u5B57", value: [], prop: "teacherName" }
      ],
      teachInfo: {
        schoolName: "",
        applyType: "",
        studyInfoDays: [],
        trainTarget: "",
        signatureTime: "",
        signaturePhoto: "",
        studentCode: ""
      },
      applyTitle: ""
    }), u = (i) => i == "\u9053\u8DEF\u5BA2\u8D27\u8FD0\u8F93\u9A7E\u9A76\u5458", b = (i) => ["\u5371\u9669", "\u5267\u6BD2", "\u7206\u70B8"].some((m) => i.includes(m));
    return z(() => t.childData, (i) => {
      var m, a, c, _, D;
      if (i && Object.keys(i).length) {
        const T = new Array(8).fill({});
        let v = {
          ...i
        };
        v.studentInfoDetails = (m = v.studentInfoDetails) == null ? void 0 : m.map((y) => {
          var P, $, j, w, N, S, L;
          const k = (P = y.studyInfoDays) == null ? void 0 : P.length;
          let I = T;
          if (k > 0 && (I = ($ = y.studyInfoDays) == null ? void 0 : $.map((r, B) => {
            var C;
            return r.trainHour = r.trainHour > 0 ? r.trainHour : 0, r.teacherName = (C = r.teacherName) != null ? C : "-", r.timeDate = `${B + 1}/${r.date}`, r;
          }), k < 8)) {
            let r = new Array(8 - k).fill({});
            I = [...I, ...r];
          }
          return {
            ...y,
            studyInfoDays: I,
            educationDictionary: {
              ...y.educationDictionary,
              educationTarget: (w = (j = y.educationDictionary) == null ? void 0 : j.educationTarget) == null ? void 0 : w.split("\u3002"),
              educationProject: (S = (N = y.educationDictionary) == null ? void 0 : N.educationProject) == null ? void 0 : S.split("\u3002")
            },
            studyList: (L = d.studyList) == null ? void 0 : L.map((r) => ({
              ...r,
              value: I
            }))
          };
        }), v.trainTarget = (_ = (c = (a = i.studentInfoDetails) == null ? void 0 : a[0]) == null ? void 0 : c.educationDictionary) == null ? void 0 : _.trainTarget, d.applyTitle = (D = M.find((y) => y.name == v.applyType)) == null ? void 0 : D.label, d.teachInfo = v;
      }
    }, {
      immediate: !0,
      deep: !0
    }), {
      ...E(d),
      getImage: J,
      getWidth(i) {
        return `${80 / i}%`;
      },
      isDangerTranport: b,
      isPassengerTranport: u
    };
  }
}), o = (t) => (O("data-v-608fcd22"), t = t(), R(), t), V = { id: "teachlog" }, X = { class: "title" }, Y = { class: "flex-justify" }, Z = { key: 0 }, x = { key: 0 }, ee = { class: "flex-justify" }, te = { key: 0 }, ne = {
  class: "teachtable",
  border: "0",
  cellspacing: "0",
  cellpadding: "0"
}, se = { colspan: "4" }, ae = { class: "flex" }, le = { class: "flex-title" }, oe = /* @__PURE__ */ o(() => /* @__PURE__ */ e("span", { class: "bold" }, "\u57F9\u8BAD\u673A\u6784\u540D\u79F0\uFF1A", -1)), ie = { colspan: "3" }, ce = { class: "flex" }, de = { class: "flex-title" }, re = /* @__PURE__ */ o(() => /* @__PURE__ */ e("span", { class: "bold" }, "\u5B66\u5458\u59D3\u540D\uFF1A", -1)), ue = { colspan: "3" }, he = { class: "flex" }, pe = /* @__PURE__ */ o(() => /* @__PURE__ */ e("div", { class: "flex-title" }, [
  /* @__PURE__ */ e("span", { class: "bold" }, "\u7533\u8BF7\u7C7B\u522B\uFF1A")
], -1)), _e = { style: { "word-break": "break-all" } }, ye = { colspan: "10" }, fe = { class: "flex" }, ge = { class: "lineheight15" }, be = /* @__PURE__ */ o(() => /* @__PURE__ */ e("span", { class: "bold" }, "\u57F9\u8BAD\u76EE\u6807 : ", -1)), me = { key: 0 }, ve = {
  class: "teachtable",
  border: "0",
  cellspacing: "0",
  cellpadding: "0"
}, Ie = {
  colspan: "2",
  rowspan: "2"
}, De = { key: 0 }, Te = /* @__PURE__ */ o(() => /* @__PURE__ */ e("br", null, null, -1)), ke = { key: 1 }, Pe = /* @__PURE__ */ o(() => /* @__PURE__ */ e("br", null, null, -1)), $e = { key: 2 }, je = /* @__PURE__ */ o(() => /* @__PURE__ */ e("td", { colspan: "4" }, [
  /* @__PURE__ */ e("h5", null, "\u6559\u5B66\u9879\u76EE")
], -1)), we = /* @__PURE__ */ o(() => /* @__PURE__ */ e("td", { colspan: "4" }, [
  /* @__PURE__ */ e("h5", null, "\u6559\u5B66\u76EE\u6807")
], -1)), Ne = { colspan: "4" }, Se = { colspan: "4" }, Le = { key: 0 }, Ce = /* @__PURE__ */ o(() => /* @__PURE__ */ e("td", { colspan: "10" }, [
  /* @__PURE__ */ e("h5", null, "\u7206\u70B8\u54C1\u8FD0\u8F93\u4ECE\u4E1A\u4EBA\u5458\u5E94\u5B66\u4E60\u5E26*\u5185\u5BB9\uFF1B\u5267\u6BD2\u5316\u5B66\u54C1\u8FD0\u8F93\u4ECE\u4E1A\u4EBA\u5458\u5E94\u5B66\u4E60\u5E26#\u5185\u5BB9")
], -1)), Ae = [
  Ce
], Be = {
  class: "teachtable",
  border: "0",
  cellspacing: "0",
  cellpadding: "0"
}, He = /* @__PURE__ */ o(() => /* @__PURE__ */ e("col", { width: "10%" }, null, -1)), We = /* @__PURE__ */ o(() => /* @__PURE__ */ e("col", { width: "10%" }, null, -1)), ze = ["width"], Ee = { colspan: "2" }, Oe = { class: "studentsign" }, Re = ["src"], Fe = { key: 1 }, Ue = {
  class: "teachtable",
  border: "0",
  cellspacing: "0",
  cellpadding: "0"
}, qe = { colspan: "7" }, Ge = {
  class: "flex items-center",
  style: { height: "60px" }
}, Je = /* @__PURE__ */ o(() => /* @__PURE__ */ e("h5", null, "\u8003\u6838\u610F\u89C1\uFF1A", -1)), Ke = { colspan: "3" }, Me = { class: "flex items-center" }, Qe = /* @__PURE__ */ o(() => /* @__PURE__ */ e("h5", null, "\u8003\u6838\u4EBA\u7B7E\u5B57\uFF1A", -1)), Ve = /* @__PURE__ */ o(() => /* @__PURE__ */ e("td", { colspan: "2" }, [
  /* @__PURE__ */ e("h5", { style: { width: "160px" } }, "\u57F9\u8BAD\u673A\u6784\u5BA1\u6838\u610F\u89C1")
], -1)), Xe = { colspan: "8" }, Ye = { class: "flex justify-end" }, Ze = /* @__PURE__ */ o(() => /* @__PURE__ */ e("div", {
  class: "flex items-end",
  style: { height: "100px" }
}, "\uFF08\u76D6\u7AE0\uFF09", -1)), xe = { key: 0 }, et = { class: "sign-img" }, tt = /* @__PURE__ */ o(() => /* @__PURE__ */ e("div", { class: "signature-regular" }, "\u57F9\u8BAD\u5408\u683C", -1)), nt = { class: "signature-time" }, st = ["src"];
function at(t, d, u, b, i, m) {
  return n(), s(h, null, [
    g(" \u6559\u5B66\u65E5\u5FD7 "),
    e("div", V, [
      e("div", X, l(t.applyTitle) + "\u4ECE\u4E1A\u8D44\u683C\u57F9\u8BAD\u6559\u5B66\u65E5\u5FD7", 1),
      e("div", null, [
        e("div", Y, [
          e("span", null, [
            t.isPassengerTranport(t.applyTitle) ? (n(), s("label", Z, "\u62EC\u53F7\u4E2D\u6807\u6CE8\u201C\u5BA2\u201D\u8005 -- \u4EC5\u4F5C\u4E3A\u9053\u8DEF\u65C5\u5BA2\u8FD0\u8F93\u9A7E\u9A76\u5458\u7684\u6559\u5B66\u9879\u76EE\u6216\u5B66\u65F6")) : g("v-if", !0)
          ]),
          t.teachInfo.enrollBatch ? (n(), s("span", x, "[" + l(t.teachInfo.enrollBatch) + "]", 1)) : g("v-if", !0)
        ]),
        e("div", ee, [
          e("span", null, [
            t.isPassengerTranport(t.applyTitle) ? (n(), s("label", te, "\u62EC\u53F7\u4E2D\u6807\u6CE8\u201C\u8D27\u201D\u8005 -- \u4EC5\u4F5C\u4E3A\u9053\u8DEF\u8D27\u7269\u8FD0\u8F93\u9A7E\u9A76\u5458\u7684\u6559\u5B66\u9879\u76EE\u6216\u5B66\u65F6")) : g("v-if", !0)
          ]),
          e("span", null, "\u5B66\u5458\u7F16\u53F7\uFF1A" + l(t.teachInfo.studentCode), 1)
        ])
      ]),
      e("div", null, [
        e("table", ne, [
          e("colgroup", null, [
            (n(), s(h, null, p(10, (a) => e("col", {
              width: "10%",
              key: a
            })), 64))
          ]),
          e("tbody", null, [
            e("tr", null, [
              e("td", se, [
                e("div", ae, [
                  e("div", le, [
                    oe,
                    f(l(t.teachInfo.schoolName), 1)
                  ])
                ])
              ]),
              e("td", ie, [
                e("div", ce, [
                  e("div", de, [
                    re,
                    f(l(t.teachInfo.name), 1)
                  ])
                ])
              ]),
              e("td", ue, [
                e("div", he, [
                  pe,
                  e("div", _e, l(t.teachInfo.applyType), 1)
                ])
              ])
            ]),
            e("tr", null, [
              e("td", ye, [
                e("div", fe, [
                  e("div", ge, [
                    be,
                    f(l(t.teachInfo.trainTarget), 1)
                  ])
                ])
              ])
            ])
          ])
        ]),
        (n(!0), s(h, null, p(t.teachInfo.studentInfoDetails, (a) => (n(), s(h, null, [
          a.educationDictionary.educationSubject == "\u533A\u57DF\u5B9E\u64CD" && t.teachInfo.applyType.includes("\u7F51\u7EDC\u9884\u7EA6") ? g("v-if", !0) : (n(), s("div", me, [
            e("table", ve, [
              e("colgroup", null, [
                (n(), s(h, null, p(10, (c) => e("col", {
                  width: "10%",
                  key: c
                })), 64))
              ]),
              e("tbody", null, [
                e("tr", null, [
                  e("td", Ie, [
                    e("h5", null, [
                      f(l(a.educationDictionary.educationSubject) + "\u5B66\u65F6\uFF1A ", 1),
                      t.isPassengerTranport(t.applyTitle) && a.educationDictionary.educationSubject == "\u7406\u8BBA" ? (n(), s("span", De, [
                        f(l(a.educationDictionary.theoryPeriod) + "(\u5BA2) ", 1),
                        Te,
                        f(" 48(\u8D27)")
                      ])) : t.isPassengerTranport(t.applyTitle) && a.educationDictionary.educationSubject == "\u5E94\u7528\u80FD\u529B" ? (n(), s("span", ke, [
                        f(l(a.educationDictionary.theoryPeriod) + "(\u5BA2)", 1),
                        Pe,
                        f(" 8(\u8D27)")
                      ])) : (n(), s("span", $e, l(a.educationDictionary.theoryPeriod), 1))
                    ])
                  ]),
                  je,
                  we
                ]),
                e("tr", null, [
                  e("td", Ne, [
                    (n(!0), s(h, null, p(a.educationDictionary.educationProject, (c, _) => (n(), s("div", {
                      class: "flex lineheight15",
                      key: `some1-${_}`
                    }, l(c), 1))), 128))
                  ]),
                  e("td", Se, [
                    (n(!0), s(h, null, p(a.educationDictionary.educationTarget, (c, _) => (n(), s("div", {
                      class: "flex lineheight15",
                      key: `some-${_}`
                    }, l(c), 1))), 128))
                  ])
                ]),
                a.educationDictionary.educationSubject === "\u7406\u8BBA" && t.isDangerTranport(t.applyTitle) ? (n(), s("tr", Le, Ae)) : g("v-if", !0)
              ])
            ]),
            e("table", Be, [
              e("colgroup", null, [
                He,
                We,
                (n(!0), s(h, null, p(a.studyInfoDays.length, (c) => (n(), s("col", {
                  width: t.getWidth(a.studyInfoDays.length),
                  key: c
                }, null, 8, ze))), 128))
              ]),
              e("tbody", null, [
                (n(!0), s(h, null, p(a.studyList, (c, _) => (n(), s("tr", { key: _ }, [
                  e("td", Ee, [
                    e("h5", null, l(c.label), 1)
                  ]),
                  (n(!0), s(h, null, p(c.value, (D, T) => (n(), s("td", {
                    key: `sub_${T}`
                  }, [
                    e("div", Oe, [
                      c.prop === "name" && t.teachInfo.signature ? (n(), s("img", {
                        key: 0,
                        class: "studentimg",
                        src: t.getImage(t.teachInfo.signature)
                      }, null, 8, Re)) : (n(), s("span", Fe, l(D[c.prop]), 1))
                    ])
                  ]))), 128))
                ]))), 128))
              ])
            ])
          ]))
        ], 64))), 256)),
        e("table", Ue, [
          e("colgroup", null, [
            (n(), s(h, null, p(10, (a) => e("col", {
              width: "10%",
              key: a
            })), 64))
          ]),
          e("tbody", null, [
            e("tr", null, [
              e("td", qe, [
                e("div", Ge, [
                  Je,
                  e("span", null, l(t.teachInfo.testRemarks), 1)
                ])
              ]),
              e("td", Ke, [
                e("div", Me, [
                  Qe,
                  e("span", null, l(t.teachInfo.testerName), 1)
                ])
              ])
            ]),
            e("tr", null, [
              Ve,
              e("td", Xe, [
                e("div", Ye, [
                  Ze,
                  t.teachInfo.signaturePhoto ? (n(), s("div", xe, [
                    e("div", et, [
                      tt,
                      e("div", nt, l(t.teachInfo.signatureTime), 1),
                      e("img", {
                        src: t.getImage(t.teachInfo.signaturePhoto),
                        alt: ""
                      }, null, 8, st)
                    ])
                  ])) : g("v-if", !0)
                ])
              ])
            ])
          ])
        ])
      ])
    ])
  ], 2112);
}
const lt = /* @__PURE__ */ K(Q, [["render", at], ["__scopeId", "data-v-608fcd22"]]), ct = G(lt);
export {
  ct as default
};
